package com.dingding.javabasic.ThreadLocal问题;

public class ThreadLoca数组下标计算 {

    private static final int HASH_INCREMENT = 0x61c88647;

    public static void main(String[] args) {
        Object o = new Object();
//        System.out.println(o.hashCode());
        calculateHashCode();
    }

    public static void calculateHashCode() {
        int value = 0;
        for (int i=0; i<16; i++) {
            value = i*HASH_INCREMENT + HASH_INCREMENT;
            int bucket = value&15;
            System.out.println(bucket);
        }
    }
}
